<?php
/* @var $this StatusController */
/* @var $model Status */
/* @var $form CActiveForm */
?>

<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

	<div class="row">
		<?php //echo $form->label($model,'status_id'); ?>
		<?php //echo $form->textField($model,'status_id'); ?>
	</div>

	<div class="row">
		<?php //echo $form->label($model,'customer_id'); ?>
		<?php //echo $form->textField($model,'customer_id'); ?>
	</div>

	<div class="row">
		<?php //echo $form->label($model,'campaign_id'); ?>
		<?php //echo $form->textField($model,'campaign_id'); ?>
	</div>

	<div class="row">
	<?php $result=User::model()->getSalespeople();?>
		<?php echo $form->label($model,'agent_id'); ?>
		<?php //echo $form->textField($model,'agent_id'); ?>
		<?php echo $form->dropDownList($model, 'agent_id',CHtml::listData($result,'user_id','user_name'),array('prompt'=>'All'));?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'status'); ?>
		<?php //echo $form->textField($model,'status',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->dropDownList($model, 'status',array(1=>'No Answer',2=>'Busy or Not Available',3=>'Invalid Number',4=>'Do not call again',5=>'No interest',6=>'Qualified lead',7=>'Won'),array('prompt'=>'All'));?>
	</div>

	<div class="row">
		<?php //echo $form->label($model,'callback_date_and_time'); ?>
		<?php //echo $form->textField($model,'callback_date_and_time',array('size'=>60,'maxlength'=>255)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'last_called_date_and_time'); ?>
		<?php //echo $form->textField($model,'last_called_date_and_time',array('size'=>60,'maxlength'=>255)); ?>
		    <?php  
    $this->widget('zii.widgets.jui.CJuiDatePicker', array( 
    	'language'=>'zh_cn', 
        'model'=>$model,  
        'attribute'=>'last_called_date_and_time',  
        'options' => array(  
         'dateFormat'=>'yy-mm-dd', //database save format     
        ),  
        'htmlOptions'=>array(    
            'style'=>'width:90px;',  
        )  
    ));?> 
	</div>

	<div class="row">
		<?php //echo $form->label($model,'notes'); ?>
		<?php //echo $form->textField($model,'notes',array('size'=>60,'maxlength'=>255)); ?>
	</div>

	<div class="row">
		<?php //echo $form->label($model,'follow_up'); ?>
		<?php //echo $form->textField($model,'follow_up',array('size'=>60,'maxlength'=>255)); ?>
	</div>

	<div class="row">
		<?php //echo $form->label($model,'sign_up_date'); ?>
		<?php //echo $form->textField($model,'sign_up_date',array('size'=>60,'maxlength'=>255)); ?>
	</div>

	<div class="row">
		<?php //echo $form->label($model,'contract_expire_date'); ?>
		<?php //echo $form->textField($model,'contract_expire_date',array('size'=>60,'maxlength'=>255)); ?>
	</div>

	<div class="row">
		<?php //echo $form->label($model,'package'); ?>
		<?php //echo $form->textField($model,'package',array('size'=>60,'maxlength'=>255)); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Search'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->